home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-05
/
src_1218.zip
/
FTPSERV.H
< prev
next >
Wrap
C/C++ Source or Header
|
1991-03-16
|
1KB
|
55 lines
#ifndef _FTPSERV_H
#define _FTPSERV_H
#include <stdio.h>
#ifndef _SOCKADDR_H
#include "sockaddr.h"
#endif
#define CTLZ 26 /* EOF for CP/M systems */
extern char *Userfile; /* List of user names and permissions */
struct ftpserv {
int control; /* Control socket */
int data; /* Data socket */
char type; /* Transfer type */
int logbsize; /* Logical byte size for logical type */
FILE *fp; /* File descriptor being transferred */
struct sockaddr_in port;/* Remote port for data connection */
char *username; /* Arg to USER command */
char *path; /* Allowable path prefix */
char perms; /* Permission flag bits */
/* (See FILES.H for definitions) */
char *cd; /* Current directory name */
};
/* FTP commands */
#define USER_CMD 0
#define ACCT_CMD 1
#define PASS_CMD 2
#define TYPE_CMD 3
#define LIST_CMD 4
#define CWD_CMD 5
#define DELE_CMD 6
#define NAME_CMD 7
#define QUIT_CMD 8
#define RETR_CMD 9
#define STOR_CMD 10
#define PORT_CMD 11
#define NLST_CMD 12
#define PWD_CMD 13
#define XPWD_CMD 14
#define MKD_CMD 15
#define XMKD_CMD 16
#define XRMD_CMD 17
#define RMD_CMD 18
#define STRU_CMD 19
#define MODE_CMD 20
int permcheck __ARGS((char *path,int perms,int op,char *file));
#endif /* _FTPSERV_H */